<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorator="layout/blank"><!-- layout文件路径-->
<head>
    <title>编辑App Version</title>
</head>
<body>
<div layout:fragment="content">
    <div class="content-frame">
        <div class="content-frame-right">
            <div class="row">
                <div class="col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">上传Apk</h3>
                            <ul class="panel-controls">
                                <li><a href="#" class="panel-remove"><span class="fa fa-times"></span></a></li>
                            </ul>
                        </div>

                        <div class="panel-body">
                            <h4>上传Apk:</h4>
                            <div class="block push-up-10">
                                <form id="apkForm" class="dropzone dropzone-mini dz-clickable">
                                    <div class="dz-default dz-message"><span>上传Apk</span></div>
                                </form>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="content-frame-body content-frame-body-left">

            <div class="row">
                <div class="col-md-12">

                    <form class="form-horizontal" id="appVersionForm" >
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title" th:if="${isEdit} eq 'add'">新增</h3>
                                <h3 class="panel-title" th:if="${isEdit} eq 'edit'">编辑</h3>
                                <ul class="panel-controls">
                                    <li><a href="#" class="panel-remove"><span class="fa fa-times"></span></a></li>
                                </ul>
                            </div>

                            <div class="panel-body">

                                <div class="form-group">
                                    <label class="col-md-3 col-xs-12 control-label">版本名称</label>
                                    <div class="col-md-6 col-xs-12">
                                        <div class="input-group">
                                            <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                            <input type="text" class="form-control" name="title"
                                                   th:if="${isEdit} eq 'add'"/>
                                            <input type="text" class="form-control" name="title"
                                                   th:value="${appVersion.title}" th:if="${isEdit} eq 'edit'"/>
                                        </div>
                                        <span class="help-block">填写名称，必填</span>
                                    </div>
                                </div>
                                <input type="hidden" name="id" th:if="${isEdit} eq 'add'"/>
                                <input type="hidden" name="id" th:value="${appVersion.id}" th:if="${isEdit} eq 'edit'"/>

                                <div class="form-group">
                                    <label class="col-md-3 col-xs-12 control-label">版本号</label>
                                    <div class="col-md-6 col-xs-12">
                                        <div class="input-group">
                                            <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                            <input type="number" class="form-control" name="versionCode"
                                                   th:if="${isEdit} eq 'add'"/>
                                            <input type="number" class="form-control" name="versionCode"
                                                   th:value="${appVersion.versionCode}" th:if="${isEdit} eq 'edit'"/>
                                        </div>
                                        <span class="help-block">填写版本号，必填</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 col-xs-12 control-label">apk地址</label>
                                    <div class="col-md-6 col-xs-12">
                                        <div class="input-group">
                                            <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                            <input type="text" class="form-control" required name="url" id="apkInput" th:if="${isEdit} eq 'add'"/>
                                            <input type="text" class="form-control" required name="url" id="apkInput" th:value="${appVersion.url}" th:if="${isEdit} eq 'edit'"/>
                                        </div>
                                        <span class="help-block">右侧上传apk，必填</span>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="col-md-3 col-xs-12 control-label">是否强制升级</label>
                                    <div class="col-md-6 col-xs-12">
                                        <select class="form-control select" name="forceUpdate">
                                            <option th:value="0" th:selected="${appVersion.forceUpdate=='0'}" th:text="否"></option>
                                            <option th:value="1" th:selected="${appVersion.forceUpdate=='1'}" th:text="是"></option>
                                        </select>
                                        <span class="help-block">是否强制升级</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 col-xs-12 control-label">详细介绍</label>
                                    <div class="col-md-6 col-xs-12">
                                        <textarea class="form-control" name="content" id="content" th:text="${appVersion.content}"></textarea>
<!--                                        <input type="hidden" name="content" id="content" th:value="${appVersion.content}"></input>-->
                                    </div>
                                </div>
                            </div>
                            <div class="panel-footer">
                                <a class="btn btn-primary pull-right" id="submit-appVersion-form-btn">提交</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>
